package net.easyjava.base.manager;

import net.easyjava.base.bean.mongodb.RequestLogBean;
import net.easyjava.base.service.mongodb.RequestLogService;
import net.easyjava.tools.BaseManager;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;

/**
 * Created by wxnacy on 15/12/21.
 */
@Service
public class RequestLogManager extends BaseManager {
    @Resource
    private RequestLogService requestLogService;

    public void saveTask(final RequestLogBean requestLogBean){
        Executor executor = Executors.newSingleThreadExecutor();
        executor.execute(new Runnable() {
            @Override
            public void run() {
                requestLogService.save(requestLogBean);
            }
        });
    }

    public void save(RequestLogBean requestLogBean){

    }

}
